Traditionally, C's absence of run-time type checking contributed to its efficiency and flexibility but could also be the source of much programming frustration. When a value was passed as a function argument, its type was not converted automatically to the type expected by the function. Thus a call to the sqrt() math library function of the form:
result = sqrt(10); /* incorrect if no ANSI C function prototype is given */
returned an incorrect result since an int argument was passed to a function expecting a double.
With the advent of function prototypes* in ANSI C (and TC and C++), automatic type conversion was extended to such cases. That is, by stating the types of the arguments expected by a function before that function is called, a function prototype gives the compiler enough information to provide the needed type conversion.